package com.aphrodite.util;

import java.util.Vector;

/**
 * Iterator
 */
public class Iterator {
	private int i;
	private Vector v;

	public Iterator(Vector vector) {
		v = vector;
		i = -1;
	}

	public boolean hasNext() {
		return i < (v.size() - 1);
	}

	public Object next() {
		if (++i < v.size())
			return v.elementAt(i);
		else
			return null;
	}

	public void remove() {
		v.removeElementAt(i);
		i--;
	}
}
